package icu.lingjie.alone;

public class FunctionHelper {

    // 当前函数执行的环境
    public static final ThreadLocal<QiLing> QI_LING_TL = new ThreadLocal<>();

    // 关联的器灵
    public static QiLing getQiLing() {
        return QI_LING_TL.get();
    }

    // 堆
    public static int[] getMemory() {
        return getQiLing().memory;
    }

    // 栈
    public static int[] getConscious() {
        return getQiLing().conscious;
    }

    // 栈指针
    public static int getConsciousPoint() {
        return getQiLing().state.consciousPoint;
    }

}
